/**
 * 
 */
package com.rxyb.toolize.uniqueId;

import java.util.concurrent.ThreadLocalRandom;

/**
 * 随机数工具
 * 小心异常
 * @coder Penn,@auth Penn
 * @date 2018年5月7日
 */
public class RandomNum {

    private static final ThreadLocalRandom RAND=ThreadLocalRandom.current();
    
    private RandomNum() {}
    
    public static  int rand6() {

        return (int) ((RAND.nextDouble() * 9 + 1) * 100000);
    }

    public static  int rand4() {

        return (int) ((RAND.nextDouble() * 9 + 1) * 1000);
    }
    
}
